bin=httpserver
cgi=test
cc=g++
LD_FLAGS=-std=c++11 -lpthread
src=main.cc 
ALL:$(bin) $(cgi)
.PHONY:ALL

$(bin):$(src)
	$(cc) -o $@ $^ $(LD_FLAGS) 
$(cgi):./CGI/test.cc 
	$(cc) -o $@ $^ 

.PHONY:output
output:
	mkdir output 
	cp $(cgi) wwwroot 
	cp -r wwwroot output 
	cp $(bin) output 

.PHONY:clean
clean:
	rm -rf $(bin)
	rm -rf output 
	
